<%= form_for record, namespace: record.id, html: {novalidate: 'novalidate'} do |f| %>
  <div class="py-3 px-4">
    <div class="mb-4">
      <%= render Form::TextInputComponent.new do |text| %>
        <% text.label_content do %>
          <%= f.label :label, "Label" %>
        <% end %>
        <% text.input do %>
          <% f.text_field :label, class: "peer text-input" %>
        <% end %>
      <% end %>
    </div>

    <div class="mb-4">
      <%= render Form::TextInputComponent.new do |text| %>
        <% text.label_content do %>
          <%= f.label :url, "URL" %>
        <% end %>
        <% text.input do %>
          <%= f.url_field :url, class: "peer  text-input" %>
        <% end %>
      <% end %>
    </div>

    <% if record.new_record? %>
      <p class="mb-4 text-500">Create your own sharing service. <a href="/help/sharing-read-it-later-services/" target="_blank">How does this work</a>?</p>
    <% end %>

    <%= render Settings::ButtonRowComponent.new do %>
      <% if record.new_record? %>
        <%= button_tag "Add Service", type: "submit", class: "button" %>
      <% else %>
        <%= button_tag "Cancel", type: "button", class: "button button-tertiary", data: {action: "expandable#toggle"} %>
        <%= button_tag "Save", type: "submit", class: "button" %>
      <% end %>
    <% end %>
  </div>
<% end %>